<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'equipment-form',
	'enableAjaxValidation'=>false,
        'htmlOptions'=>array(
            'enctype'=>'multipart/form-data',
        )
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
        <?php if(isset($model->image)):?>
            <img src="<?=getImageBySize($model->image,250,250);?>"/>
        <?php endif?>
        <div class="row">
		<?php echo $form->labelEx($model,'image'); ?>
                <?php echo $form->fileField($model,'file');?>
                <div class="model-data">
                    <?php echo $model->image; ?>
                </div>
		
		<?php echo $form->error($model,'file'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'custno'); ?>
                <div class="model-data">
                    <?php echo $model->custno; ?>
                </div>
		
		<?php echo $form->error($model,'custno'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'locno'); ?>
                <div class="model-data">
                    <?php echo $model->locno; ?>
                </div>
		
		<?php echo $form->error($model,'locno'); ?>
	</div>
    <div class="left-column">
        <div class="row short">
            <?php echo $form->labelEx($model,'description'); ?>
            <?php echo $form->textField($model,'description'); ?>
            <?php echo $form->error($model,'description'); ?>
        </div>
        <div class="row short">
            <?php echo $form->labelEx($model,'mfg'); ?>
            <?php echo $form->textField($model,'mfg',array('size'=>20,'maxlength'=>20)); ?>
            <?php echo $form->error($model,'mfg'); ?>
        </div>

        <div class="row short">
            <?php echo $form->labelEx($model,'model'); ?>
            <?php echo $form->textField($model,'model',array('size'=>30,'maxlength'=>30)); ?>
            <?php echo $form->error($model,'model'); ?>
        </div>

        <div class="row short">
            <?php echo $form->labelEx($model,'serial'); ?>
            <?php echo $form->textField($model,'serial',array('size'=>50,'maxlength'=>50)); ?>
            <?php echo $form->error($model,'serial'); ?>
        </div>
    <div class="row short">
            <?php echo $form->labelEx($model,'ncr_billed_serial'); ?>
            <?php echo $form->textField($model,'ncr_billed_serial',array('size'=>50,'maxlength'=>50)); ?>
            <?php echo $form->error($model,'ncr_billed_serial'); ?>
        </div>
    

        <div class="row short">
            <?php echo $form->labelEx($model,'install'); ?>
            <?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                        'model'=>$model,
                        'attribute'=>'install',
                        'value'=>CTimestamp::formatDate('Y-m-d',$model->install),
                        'options' => array('dateFormat'=>'yy-mm-dd'),
                    )); ?>
            <?php echo $form->error($model,'install'); ?>
        </div>

        <div class="row short">
            <?php echo $form->labelEx($model,'removed'); ?>
            <?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                        'model'=>$model,
                        'attribute'=>'removed',
                        'value'=>CTimestamp::formatDate('Y-m-d',$model->install),
                        'options' => array('dateFormat'=>'yy-mm-dd'),
                    )); ?>
            <?php echo $form->error($model,'removed'); ?>
        </div>

        <div class="row short">
            <?php echo $form->labelEx($model,'warranty'); ?>
            <?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
            'model'=>$model,
            'attribute'=>'warranty',
            'value'=>CTimestamp::formatDate('Y-m-d',$model->install),
            'options' => array('dateFormat'=>'yy-mm-dd'),
        )); ?>
            <?php echo $form->error($model,'warranty'); ?>
        </div>
            
    </div>
     <div class="right-column" >




        <div class="row short">
            <?php echo $form->labelEx($model,'equiploc'); ?>
            <?php echo $form->textField($model,'equiploc',array('size'=>60,'maxlength'=>150)); ?>
            <?php echo $form->error($model,'equiploc'); ?>
        </div>



        <div class="row short">
            <?php echo $form->labelEx($model,'invoice'); ?>
            <?php echo $form->textField($model,'invoice',array('size'=>10,'maxlength'=>10)); ?>
            <?php echo $form->error($model,'invoice'); ?>
        </div>

        <div class="row short">
            <?php echo $form->labelEx($model,'eqtype'); ?>
            <?php echo $form->textField($model,'eqtype',array('size'=>25,'maxlength'=>25)); ?>
            <?php echo $form->error($model,'eqtype'); ?>
        </div>



        <div class="row short">
            <?php echo $form->labelEx($model,'status'); ?>
            <?php echo $form->dropDownList($model,'status',$model->statusList); ?>
            <?php echo $form->error($model,'status'); ?>
        </div>




            <div class="row short">
            <?php echo $form->labelEx($model,'terminalid'); ?>
            <?php echo $form->textField($model,'terminalid',array('size'=>25,'maxlength'=>150)); ?>
            <?php echo $form->error($model,'terminalid'); ?>
        </div>
            <div class="row short">
            <?php echo $form->labelEx($model,'notes'); ?>
            <?php echo $form->textArea($model,'notes',array('rows'=>6, 'cols'=>50)); ?>
            <?php echo $form->error($model,'notes'); ?>
        </div>

    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->
